package com.authManager.commons.feignApi;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.authManager.commons.feignApi.hystric.SysRoleMenuApiHystric;
import com.authManager.entity.SysRoleMenu;
import com.commons.base.model.AdminPage;
import com.commons.base.model.ResultData;

@FeignClient(value = "authManager-server", fallback = SysRoleMenuApiHystric.class)
public interface SysRoleMenuApi {
	static final String projectAaaApiBaseUrl = "/authManager-server/admin/sysRoleMenu";

	/**
	 * 添加【角色菜单关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/saveSysRoleMenu", method = { RequestMethod.POST })
	public ResultData<Object> saveSysRoleMenu(@RequestParam(value = "sysRoleId",required = false) Long sysRoleId,
			@RequestParam(value = "sysMenuIds",required = false) String sysMenuIds,
			@RequestParam(value = "systemCode",required = false) String systemCode);

	/**
	 * 修改【角色菜单关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/editSysRoleMenu", method = { RequestMethod.POST })
	public ResultData<Object> editSysRoleMenu(@RequestParam(value = "sysRoleMenuId",required = true) Long sysRoleMenuId,
			@RequestParam(value = "sysRoleId",required = false) Long sysRoleId, @RequestParam(value = "sysMenuId",required = false) Long sysMenuId,
			@RequestParam(value = "systemCode",required = false) String systemCode);

	/**
	 * 删除【角色菜单关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/delSysRoleMenu", method = { RequestMethod.POST })
	public ResultData<Object> delSysRoleMenu(@RequestParam(value = "sysRoleMenuId",required = true) Long sysRoleMenuId);

	/**
	 * 获取【角色菜单关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/getSysRoleMenu", method = { RequestMethod.POST })
	public ResultData<SysRoleMenu> getSysRoleMenu(@RequestParam(value = "sysRoleMenuId",required = true) Long sysRoleMenuId);

	/**
	 * 列表【角色菜单关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/listSysRoleMenu", method = { RequestMethod.POST })
	public ResultData<AdminPage<SysRoleMenu>> listSysRoleMenu(
			@RequestParam(value = "pageNum",defaultValue = "1", required = false) Integer pageNum,
			@RequestParam(value = "pageSize",defaultValue = "10", required = false) Integer pageSize,
			@RequestParam(value = "sysRoleMenuId",required = false) Long sysRoleMenuId, @RequestParam(value = "sysRoleId",required = false) Long sysRoleId,
			@RequestParam(value = "sysMenuId",required = false) Long sysMenuId, @RequestParam(value = "systemCode",required = false) String systemCode,
			@RequestParam(value = "start_createTime",required = false) String start_createTime,
			@RequestParam(value = "end_createTime",required = false) String end_createTime);
}
